import type { RouteRecordRaw } from 'vue-router';
/**
 * 静态路由（默认路由）
 */
export const staticRoutes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'Home',
        component: () => import('@/views/home/index.vue'),
        meta: {
            hidden: false
        }
    },
    {
        path: '/detail',
        name: 'Detail',
        component: () => import('@/views/detail/index.vue'),
        meta: {
            hidden: true
        }
    },
    {
        path: '/search',
        redirect: '/search/searchDialog',
        name: 'Search',
        component: () => import('@/components/search/index.vue'),
        meta: {
            hidden: true
        },
        children: [
            {
                path: 'searchDialog',
                name: 'SearchDialog',
                component: () => import('@/components/search/searchDialog/index.vue'),
               
            },
            {
                path: 'searchGoodsList',
                name: 'SearchGoodsList',
                component: () => import('@/components/search/searchGoodsList/index.vue')
            },

        ],

    },
    {
        path: '/item',
        name: 'Category',
        component: () => import('@/views/item/index.vue'),
        children: [
            {
                path: 'cateList',
                component: () => import('@/views/item/category/index.vue'),
                meta: {
                    hidden: false
                },
            },
            {
                path: 'list',
                component: () => import('@/views/item/detailList/index.vue')

            },
            {
                path: 'homeList',
                component: () => import('@/views/item/homeList/index.vue'),
                meta: {
                    hidden: true
                },
            }
        ]
    },
    {
        path: '/topic',
        name: 'Topic',
        component: () => import('@/views/topic/index.vue'),
        children: [
            {
                path: 'index',
                component: () => import('@/views/topic/index/index.vue'),
                meta: {
                    hidden: false
                },
            }
        ]
    },
    {
        path: '/cart',
        name: 'Cart',
        component: () => import('@/views/cart/index.vue'),
        meta: {
            hidden: false
        }
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/user/login/index.vue'),
        meta: {
            hidden: true
        }
    },
    {
        path: '/enter',
        name: 'Enter',
        component: () => import('@/views/user/login/enter.vue'),
        meta: {
            hidden: true
        }
    },
    {
        path: '/email',
        name: 'Email',
        component: () => import('@/views/user/login/email.vue'),
        meta: {
            hidden: true
        }
    },
    {
        path: '/register',
        name: 'Register',
        component: () => import('@/views/user/login/register.vue'),
        meta: {
            hidden: false
        }
    },
    {
        path: '/user',
        name: 'User',
        component: () => import('@/views/user/login/user.vue'),
        meta: {
            hidden: false
        }
    },



    {
        path: '/',
        redirect: '/home',
        meta: {
            title: '首页',
            icon: 'ele-HomeFilled',
        }
    },
    {
        path: '/:pathMatch(.*)',
        name: 'Any',
        redirect: '/404',
        meta: {
            hidden: true
        }
    },

    {
        path: '/404',
        name: '404',
        component: () => import('@/views/error/404.vue'),
        meta: {
            hidden: true
        }
    },


];